home *** CD-ROM | disk | FTP | other *** search
- # Source Generated with Decompyle++
- # File: in.pyc (Python 2.6)
-
- from base.g import *
- from base.codes import *
- from ui_utils import *
- from PyQt4.QtCore import *
- from PyQt4.QtGui import *
-
- class SystrayFrame(QFrame):
-
- def __init__(self, parent):
- QFrame.__init__(self, parent)
-
-
- def initUi(self, systray_visible, polling, polling_interval, device_list):
- self.systray_visible = systray_visible
- self.polling = polling
- self.polling_interval = polling_interval
- self.device_list = device_list
- self.GridLayout = QGridLayout(self)
- self.GridLayout.setObjectName('GridLayout')
- self.GroupBox2 = QGroupBox(self)
- self.GroupBox2.setObjectName('GroupBox2')
- self.GridLayout2 = QGridLayout(self.GroupBox2)
- self.GridLayout2.setObjectName('GridLayout2')
- self.ShowAlwaysRadioButton = QRadioButton(self.GroupBox2)
- self.ShowAlwaysRadioButton.setObjectName('ShowAlwaysRadioButton')
- self.GridLayout2.addWidget(self.ShowAlwaysRadioButton, 0, 0, 1, 1)
- self.HideWhenInactiveRadioButton = QRadioButton(self.GroupBox2)
- self.HideWhenInactiveRadioButton.setObjectName('HideWhenInactiveRadioButton')
- self.GridLayout2.addWidget(self.HideWhenInactiveRadioButton, 1, 0, 1, 1)
- self.HideAlwaysRadioButton = QRadioButton(self.GroupBox2)
- self.HideAlwaysRadioButton.setObjectName('HideAlwaysRadioButton')
- self.GridLayout2.addWidget(self.HideAlwaysRadioButton, 2, 0, 1, 1)
- self.GridLayout.addWidget(self.GroupBox2, 0, 0, 1, 1)
- self.GroupBox = QGroupBox(self)
- self.GroupBox.setCheckable(True)
- self.GroupBox.setObjectName('GroupBox')
- self.GridLayout3 = QGridLayout(self.GroupBox)
- self.GridLayout3.setObjectName('GridLayout3')
- self.label = QLabel(self.GroupBox)
- self.label.setObjectName('label')
- self.GridLayout3.addWidget(self.label, 0, 0, 1, 1)
- self.DevicesListWidget = QListWidget(self.GroupBox)
- self.DevicesListWidget.setObjectName('DevicesListWidget')
- self.GridLayout3.addWidget(self.DevicesListWidget, 1, 0, 1, 1)
- self.GridLayout.addWidget(self.GroupBox, 1, 0, 1, 1)
- self.GroupBox2.setTitle(self._SystrayFrame__tr('System tray icon visibility'))
- self.ShowAlwaysRadioButton.setText(self._SystrayFrame__tr('Always show'))
- self.HideWhenInactiveRadioButton.setText(self._SystrayFrame__tr('Hide when inactive'))
- self.HideAlwaysRadioButton.setText(self._SystrayFrame__tr('Always hide'))
- self.GroupBox.setTitle(self._SystrayFrame__tr('Monitor button presses on devices'))
- self.label.setText(self._SystrayFrame__tr('Devices to Monitor:'))
- self.connect(self.ShowAlwaysRadioButton, SIGNAL('clicked(bool)'), self.ShowAlwaysRadioButton_clicked)
- self.connect(self.HideWhenInactiveRadioButton, SIGNAL('clicked(bool)'), self.HideWhenInactiveRadioButton_clicked)
- self.connect(self.HideAlwaysRadioButton, SIGNAL('clicked(bool)'), self.HideAlwaysRadioButton_clicked)
- self.GroupBox.setEnabled(False)
-
-
- def updateUi(self):
- self.updateVisibility()
- self.updateDeviceList()
-
-
- def updateVisibility(self):
- if self.systray_visible == SYSTRAY_VISIBLE_SHOW_ALWAYS:
- self.ShowAlwaysRadioButton.setChecked(True)
- elif self.systray_visible == SYSTRAY_VISIBLE_HIDE_WHEN_INACTIVE:
- self.HideWhenInactiveRadioButton.setChecked(True)
- else:
- self.HideAlwaysRadioButton.setChecked(True)
-
-
- def ShowAlwaysRadioButton_clicked(self, b):
- if b:
- self.systray_visible = SYSTRAY_VISIBLE_SHOW_ALWAYS
-
-
-
- def HideWhenInactiveRadioButton_clicked(self, b):
- if b:
- self.systray_visible = SYSTRAY_VISIBLE_HIDE_WHEN_INACTIVE
-
-
-
- def HideAlwaysRadioButton_clicked(self, b):
- if b:
- self.systray_visible = SYSTRAY_VISIBLE_HIDE_ALWAYS
-
-
-
- def updateDeviceList(self):
- pass
-
-
- def __tr(self, s, c = None):
- return QApplication.translate('SystrayFrame', s, c, QApplication.UnicodeUTF8)
-
-
-